import plantBase
import sun
from data import *

class SunFlower(plantBase.PlantBase):
    def __init__(self,surface,pos) :
        self.path = data.get('sunFlower').get('imagePath')
        self.size = data.get('sunFlower').get('size')
        self.gap = data.get('sunFlower').get('gap')
        summonTime = data.get('pea').get('summonTime')
        self.surface = surface
        self.pos = pos
        super().__init__(self.surface,self.path,self.size,self.pos,self.gap,summonTime)


    def summon(self):
        summon = None
        if super().checkSummon():
            super().summon()
            summon = sun.Sun(self.surface,[self.pos[0],0],self.pos[1])
        return summon



